package com.dd.cloud.user.mapper.drugs;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.dd.cloud.user.entity.drugs.DrugsOutbound;
import com.dd.cloud.user.req.drugs.DrugsOutboundGroupPageReq;
import com.dd.cloud.user.req.drugs.DrugsOutboundOrderPageReq;
import com.dd.cloud.user.res.drugs.DrugsOutboundGroupPageRes;
import com.dd.cloud.user.res.drugs.DrugsOutboundOrderPageRes;
import com.dd.cloud.user.res.drugs.DrugsOutboundOrderSummary;
import com.dd.cloud.user.res.drugs.SummaryPage;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 药品出库记录表 Mapper 接口
 * </p>
 *
 * @author czg
 * @since 2023-04-18
 */
public interface DrugsOutboundMapper extends BaseMapper<DrugsOutbound> {

    /**
     * 分页查询出库记录 按药品分组查询
     */
    Page<DrugsOutboundGroupPageRes> getDrugsOutboundPage(Page<DrugsOutboundGroupPageRes> page, DrugsOutboundGroupPageReq req);

    /**
     * 分页查询药品出库记录 按订单查询
     */
    SummaryPage<DrugsOutboundOrderPageRes> getDrugsOutboundOrderPage(SummaryPage page, DrugsOutboundOrderPageReq req);

    /**
     * 查询药品出库记录 按订单查询 汇总数据
     */
    List<DrugsOutboundOrderSummary> getDrugsOutboundSummary( @Param("req") DrugsOutboundOrderPageReq req);
}
